package cn.pjz.dataUpload.web.controller;

import cn.pjz.basic.result.JSONResult;
import cn.pjz.dataUpload.entity.RTransaction;
import cn.pjz.dataUpload.service.RTransactionService;
import cn.pjz.dataUpload.web.vo.RTransactionVo;
import cn.pjz.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.*;

import static cn.pjz.utils.constant.CONSTANT_WX;

@RestController
public class DataEngineController {

    @Autowired
    private RTransactionService rTransactionService;


    @PostMapping("/module_1")
    public JSONResult module_1() {
        Map<String, String> map = rTransactionService.module_1();
        return JSONResult.success(map);
    }

    @PostMapping("/module_2")
    public JSONResult module_2() {
        List<RTransaction> rTransactions = rTransactionService.module_2();
        return JSONResult.success(rTransactions);
    }

    @PostMapping("/module_3")
    public JSONResult module_3(@RequestBody RTransactionVo rTransactionVo) {
        HashMap<String,Object> map = rTransactionService.module_3(rTransactionVo);
        return JSONResult.success(map);
    }

}
